/*
 * @Author: Bennent_G
 * @Date: 2025-01-17 09:21:29
 * @LastEditTime: 2025-01-17 11:01:15
 * @Description: admin routes
 */
import { RouteRecordRaw } from 'vue-router';
import BaseLayout from "@/layouts/BaseLayout.vue";

const adminRoutes: Array<RouteRecordRaw> = [
	{
		path: "/admin",
		redirect: {name: "login"},
		children: [
			{
				name: "login",
				path: "login",
				component: () => import('@/views/admin/Login.vue')
			},
			{
				name: "home",
				path: "",
				component: BaseLayout,
				redirect: {name: "welcome"},
				children: [
					{
						name: "welcome",
						path: "welcome",
						component: () => import('@/views/admin/Welcome.vue')
					},
					{
						name: "subDashboard",
						path: "subdashboard",
						component: () => import('@/views/admin/dashboard/Dashboard.vue')
					},
					{
						name: "系统管理",
						path: "sys",
						children: [
							{
								name: "user",
								path: "user",
								component: () => import('@/views/admin/systems/User.vue')
							},
							{
								name: "dept",
								path: "dept",
								component: () => import('@/views/admin/systems/Dept.vue')
							},
							{
								name: "role",
								path: "role",
								component: () => import('@/views/admin/systems/Role.vue')
							},
							{
								name: "menu",
								path: "menu",
								component: () => import('@/views/admin/systems/Menu.vue')
							},
							{
								name: "dictionary",
								path: "dictionary",
								component: () => import('@/views/admin/systems/Dictionary.vue')
							},
						],
					},
					{
						name: "异常页",
						path: "error",
						children: [
							{
								name: "403",
								path: "403",
								component: () => import('@/views/admin/error/403.vue')
							},
							{
								name: "404",
								path: "404",
								component: () => import('@/views/admin/error/404.vue')
							},
							{
								name: "500",
								path: "500",
								component: () => import('@/views/admin/error/500.vue')
							}
						]
					}
				],
			},
			// {
			// 	name: "welcome",
			// 	path: "welcome",
			// 	component: () => import('@/views/admin/Welcome.vue')
			// },
		]
	},
];

export default adminRoutes;
